/**
 * Created by wangyu
 */

/**
 * 代理API
 * @param {String} api
 * @returns {*}
 */
export const proxyAPI = (api: string): string =>
  `${(window as any).ENV_DV.apiDomain.replace(/\/$/, '')}/${api.replace(
    /^\//,
    ''
  )}`;
/**
 * 添加公共API
 * @type {{}}
 */
const EnumAPI: any = {
  login: proxyAPI('/iam-admin/uc/v1/login'), // 登录
  logout: proxyAPI('/iam-admin/uc/v1/logout'), // 注销
  getCode: proxyAPI('/iam-admin/uc/v1/getCode'), // 获取验证码
};

export default EnumAPI;
